package com.jichangxiu.framework.factory;

import cn.hutool.core.util.ObjectUtil;
import cn.hutool.extra.spring.SpringUtil;
import com.jichangxiu.framework.service.LogRuleService;
import com.jichangxiu.framework.service.impl.DefaultLogRuleServiceImpl;

public class LogRuleServiceFactory {

    public static LogRuleService logRuleService() {
        LogRuleService logService;
        try {
            logService = SpringUtil.getBean(LogRuleService.class);
            if (ObjectUtil.isEmpty(logService))
                logService = new DefaultLogRuleServiceImpl();
        } catch (Exception exception) {
            logService = new DefaultLogRuleServiceImpl();
        }
        return logService;
    }

}
